package com.foreknow.mapping;


import java.util.HashMap;
import java.util.Map;

public class MappingFactory {
    private static MappingFactory mappingFactory;
    private Map<String,EntityMapping> maps=new HashMap<>();
    public static final String ADMINMAPPING="adminmapping";
    public static final String FOODMAPPING="foodmapping";
    public static final String BUSINESSMAPPING="businessmapping";
    private MappingFactory(){

    }
    public static MappingFactory getInstance(){
        if (mappingFactory==null){
            mappingFactory=new MappingFactory();
            mappingFactory.maps.put(ADMINMAPPING,new AdminMapping());
            mappingFactory.maps.put(BUSINESSMAPPING,new BusinessMapping());
        }
            return mappingFactory;
    }
    public EntityMapping getmap(String key){
        return maps.get(key);
    }
}
